home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000
/
Ham Radio 2000.iso
/
ham2000
/
tcp_ip
/
os2
/
pmnos11s
/
arcdump.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-30
|
788b
|
46 lines
/* ARCNET trace routines
* Copyright 1990 Russ Nelson
*/
#include <stdio.h>
#include "global.h"
#include "mbuf.h"
#include "arcnet.h"
#include "trace.h"
void
arc_dump(ip,bpp,check)
struct iface *ip;
struct mbuf **bpp;
int check; /* Not used */
{
struct arc ahdr;
char s[20],d[20];
ntoharc(&ahdr,bpp);
parc(s,ahdr.source);
parc(d,ahdr.dest);
prtTrace(ip,"Arcnet: len %u %s->%s",ARCLEN + len_p(*bpp),s,d);
switch(uchar(ahdr.type)){
case ARC_IP:
prtTrace(ip," type IP\n");
ip_dump(ip,bpp,1);
break;
case ARC_ARP:
prtTrace(ip," type ARP\n");
arp_dump(ip,bpp);
break;
default:
prtTrace(ip," type 0x%x\n",ahdr.type);
break;
}
}
int
arc_forus(iface,bp)
struct iface *iface;
struct mbuf *bp;
{
return 1;
}